package com.yunsc.system.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.yunsc.common.serializer.TimestampToDateSerializer;
import lombok.Data;

import java.io.Serializable;
import java.util.List;

/**
 * 商家用户记录表
 * 
 * @author adan
 * @email 2028038953@qq.com
 * @date 2024-04-05 01:37:46
 */
@Data
@TableName("yunsc_store_user")
public class YunscStoreUserEntity implements Serializable {
	private static final long serialVersionUID = 1L;

	/**
	 * 主键ID
	 */
	@TableId
	private Integer storeUserId;
	/**
	 * 用户名
	 */
	private String userName;
	/**
	 * 登录密码
	 */
	private String password;
	/**
	 * 姓名
	 */
	private String realName;
	/**
	 * 是否为超级管理员
	 */
	private Integer isSuper;
	/**
	 * 是否删除
	 */
	private Integer isDelete;
	/**
	 * 排序(数字越小越靠前)
	 */
	private Integer sort;
	/**
	 * 商城ID
	 */
	private Integer storeId;
	/**
	 * 创建时间
	 */
	@JsonInclude(JsonInclude.Include.NON_NULL)
	@TableField(fill = FieldFill.INSERT)
	@JsonSerialize(using = TimestampToDateSerializer.class)
	private Integer createTime;
	/**
	 * 更新时间
	 */
	@JsonInclude(JsonInclude.Include.NON_NULL)
	@TableField(fill = FieldFill.INSERT_UPDATE)
	@JsonSerialize(using = TimestampToDateSerializer.class)
	private Integer updateTime;


	@TableField(exist = false)
	@JsonInclude(JsonInclude.Include.NON_EMPTY)
	private List<YunscStoreRoleEntity> role;
	@TableField(exist = false)
	@JsonInclude(JsonInclude.Include.NON_EMPTY)
	@JsonProperty("roleIds")
	private List<Integer> roleIds;

}
